import Vue from 'vue'
import Router from 'vue-router'
import movieRouter from './movie'
import cinemaRouter from './cinema'
import mineRouter from './mine'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  linkActiveClass: 'active',
  linkExactActiveClass: 'active',
  routes: [
    {
      path: '/',
      redirect: '/movie'
    },
    {
      path: '/swiper',
      component: () => import('@/views/swiper-demo.vue')
    },
    {
      path: '/play',
      component: () => import('@/views/playdemo.vue')
    },
    movieRouter,
    cinemaRouter,
    mineRouter,
    {
      path: '/*',
      redirect: '/movie'
    }
  ]
})
